package com.itic.mall.system.statis.service;


import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.itic.appbase.framework.common.service.CrudService;
import com.itic.mall.system.statis.persistence.dao.StatisDao;
import com.itic.mall.system.statis.persistence.model.Statis;
import com.itic.mall.system.statis.persistence.model.StatisExample;


@Service
@Transactional
public class StatisService
     extends CrudService<StatisDao,Statis,StatisExample> {
    @Autowired
    private StatisDao statisDao;

	public Statis getLastData() {
		Statis statis = null;
		StatisExample example = new StatisExample();
		example.setOrderByClause("CREATE_TIME DESC");
		List<Statis> list = statisDao.selectByExample(example);
		if( list.size() > 0 ){
		       statis = list.get(0);
		}
		return statis;
	}

} 